Content starts here Creating XMLBean Classes for Java Functions
This page last changed on Mar 27, 2008.

Creating XMLBean Classes for Java Functions

This topic describes how to create XMLBean classes based on a schema of your data.

Creating a New Project

You need to create a new project to build the XMLBean classes.

New Project

To create a new project:

  1. Using WorkSpace Studio, create a new project by right-clicking in the Project Explorer and choosing New > Project in the menu. The New Project wizard is launched.
  2. Choose Java > Java Project and click Next.
  3. Type a name for the project and select Create separate source and output folders in the Project layout area.
  4. Click Finish. WorkSpace Studio creates a new project in the Project Explorer.
New Java Project Wizard

Enabling XMLBeans Builder

You need to enable the XMLBeans Builder in the project to allow it to create classes based on the Java source and XML schema files.

Project Properties

To enable XMLBeans Builder:

  1. Right-click the new project, and choose Properties from the menu. The Properties dialog appears.
  2. Click XMLBeans, select the Enable XMLBeans Builder checkbox, and click OK.
Enabling XMLBeans Builder

Importing Schema and Java Source Files

You need to import the schema files and Java source files into the project.

To import the schema and Java source files:

  • Copy the schema files representing the data used by the Java functions along with the Java source files into the src folder.

Creating a Project Reference

The final step involves creating a reference to your XMLBeans-based project from the dataspace in which you want to use the Java functions.

To create the project reference:

  1. Right-click the dataspace project in which you want to use the Java functions and choose Properties from the menu.
  2. Select Project References in the Properties dialog.
  3. Select your XMLBeans-based project, and click OK.

When your project is deployed, ALDSP does the following:

  • Rebuilds your XMLBeans-based project, if required, and generates a JAR file
  • Copies the JAR file to the DSP-INF/lib folder in the dataspace project
Project References

Document generated by Confluence on Apr 28, 2008 15:54